package week04.bank;
  //  An account that earns interest at a fixed rate.

public class ContDebit extends ContBancar
 {
    /**
       Constructs a bank account with a given interest rate.
       @param rate the interest rate
    */
    public ContDebit(double rata)
    {
       rataDobanzii = rata;
    }

    /**
       Adds the earned interest to the account balance.
    */
    public void dobanda()
    {
       double dobanda = getSold() * rataDobanzii / 100;
       depunere(dobanda);
    }

    private double rataDobanzii;
 }